Apple Video
   HOME

TheInfoList



OR:

Apple Video is a
lossy In information technology, lossy compression or irreversible compression is the class of data compression methods that uses inexact approximations and partial data discarding to represent the content. These techniques are used to reduce data size ...
video compression and decompression algorithm ( codec) developed by
Apple Inc. Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company b ...
and first released as part of QuickTime 1.0 in 1991. The codec is also known as QuickTime Video, by its
FourCC A FourCC ("four-character code") is a sequence of four bytes (typically ASCII) used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts I ...
RPZA and the name Road Pizza. (The codename "Road Pizza" is a reference to the idea that "when you run over an animal, you're basically compressing it on the freeway".) When used in the
AVI Avi is a given name, usually masculine, often a diminutive of Avram, Avraham, etc. It is sometimes feminine and a diminutive of the Hebrew spelling of Abigail. People with the given name include: * Avi (born 1937), Newbery award-winning Americ ...
container, the FourCC AZPR is also used. The bit-stream format of Apple Video has been reverse-engineered and a decoder has been implemented in the projects XAnim and
libavcodec libavcodec is a free and open-source library of codecs for encoding and decoding video and audio data. libavcodec is an integral part of many open-source multimedia applications and frameworks. The popular MPV, xine and VLC media players use ...
.


Technical Details

The codec operates on 4×4 blocks of pixels in the RGB colorspace. Each frame is segmented into 4×4 blocks in raster-scan order. Each block is coded in one of four coding modes: skip, single color, four color, or 16 color. Colors are represented by 16 bits with a bit-depth of 5 bit for each of the three components red, green, and blue, a format known as RGB555. Because Apple Video operates in the image domain without motion compensation, decoding is much faster than MPEG-style codecs which use
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
and perform coding in a transform domain. As a tradeoff, the compression performance of Apple Video is lower.


Skip mode

The skip mode realizes conditional replenishment. If a block is coded in skip mode, the content of the block at same location in the previous frame is copied to the current frame. Runs of skip blocks are coded in a
run-length encoding Run-length encoding (RLE) is a form of lossless data compression in which ''runs'' of data (sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original ...
scheme, enabling a high compression ratio in static areas of the picture.


Single color mode

In single color mode, all pixels in a block are decoded in the same color. This can be interpreted as a
palette Palette may refer to: * Cosmetic palette, an archaeological form * Palette, another name for a color scheme * Palette (painting), a wooden board used for mixing colors for a painting ** Palette knife, an implement for painting * Palette (company), ...
with a single color.


Four color mode

In four color mode, each pixel in a block is decoded as one of four colors which are specified in a palette. To select one of the four entries, 2 bits per pixel are written to the bit-stream. The same palette is used for a run of length between one and 32 blocks. Of the four colors, two are explicitly written to the bit-stream, while the other two are calculated at the decoder by linear interpolation in the RGB colorspace using the following equations: ::\mathrm = \frac * \mathrm +\frac * \mathrm \approx \frac * \mathrm +\frac * \mathrm ::\mathrm = \frac * \mathrm +\frac * \mathrm \approx \frac * \mathrm +\frac * \mathrm where color0 and color3 are the two colors which are written in the bit-stream. The four colors can be interpreted as lying equidistantly spaced on a line segment in the three-dimensional vector space with the three components red, green, and blue. The end-points of this line are written in the bit-stream. A similar color-interpolation scheme is used in S3 Texture Compression. Interpreted as vector quantization, a three-dimensional vector with the components red, green, and blue is quantized using a codebook with four entries.


16 color mode

In 16-color mode, the color of each pixel in a block is explicitly written in the bit-stream. This mode is lossless and equivalent to raw
PCM Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the amp ...
without any compression.


See also

* Indexed color * Color quantization * Block truncation coding, a similar coding technique for grayscale content * Color Cell Compression, a similar coding technique for color content, based on block truncation coding * Microsoft Video 1, a codec based on a similar design * QuickTime Graphics, a codec based on a similar design * Smacker video, a codec based on a similar design * S3 Texture Compression, a texture compression format based on a similar design


References


External links


Apple Video decoder - FFmpeg
{{Compression formats Video codecs Lossy compression algorithms
Video Video is an electronic medium for the recording, copying, playback, broadcasting, and display of moving visual media. Video was first developed for mechanical television systems, which were quickly replaced by cathode-ray tube (CRT) syste ...